<template>
    <div>
        <!-- 轮播图 -->
        <swpier></swpier>
        <news :new1="new1" :new2="new2"></news>
        <swpier2></swpier2>
        <!-- 成员风采  :card="card" -->
    </div>
</template>

<script>
import swpier from "@/components/home/swpier.vue"
import news from "@/components/home/news.vue"
import swpier2 from "@/components/home/swpier2.vue"
export default {
    data() {
        return {
            new1: [],
            new2: [],
            card: [],
        }
    },
    async created() {
        let result = await fetch(
            "http://112.74.177.201:7001/api/getindex",
            {
                method: "POST",
            }
        ).then((res) => res.json())

        console.log("请求的首页数据", result.data)
        this.new1 = result.data.new1
        this.new2 = result.data.new2
    },
    components: {
        swpier,
        news,
        swpier2,
    },
}
</script>

<style lang="scss" scoped></style>
